onselectchange Event (Dropdown, Listbox) |
This event is fired before the contents of the object selected is changed.
Syntax
Inline HTML |
<div cordysType="wcp.library.ui.Dropdown" id=dropdownID onselectchange="handler()"...> ... </div> OR <div cordysType="wcp.library.ui.ListBox" id=listboxID onselectchange="handler()"...> ... </div> |
Event property |
controlID.onselectchange = handler |
Event Information
To invoke |
Change the item displayed in the dropdown or listbox. |
Default Action |
Initiates any action associated with this event, and changes the item in the combo box. |
Event Object Properties
Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.
Property |
Description |
---|---|
option |
Read-only. Object that denotes the item that is currently selected in the dropdown or listbox. |
selectedIndex |
Read-only. Integer that denotes the index of item selected. |
text |
Read-only. String that contains the text displayed in the selected item. |
value |
Read-only. String that contains the value of the selected item. |
returnValue |
Read-only. Boolean that sets or retrieves the return value from the event.true- Default. Item is changed from the dropdown or listbox.false- Item will not be changed from the dropdown or listbox. Change will be cancelled. |